package com.peter.design.pattern.flyweight.jdk.integer;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/27 21:06
 * @Description: Integer类内部有缓存 [-128, 127]
 */
public class IntegerTest {
    public static void main(String[] args) {

        Integer a = Integer.valueOf(100);
        Integer b = 100;

        Integer c = Integer.valueOf(1000);
        Integer d = 1000;

        System.out.println("a==b:" + (a==b));
        System.out.println("c==d:" + (c==d));
    }
}
